/**
 * <p>
 * 表格配置
 *
 * @Author：Roy
 * @Description：碳减因子
 * @Date：Create by 2023-11-23 16:28:52
 */
// 隐藏操作按钮的规则配置，字段名：isEdit
const isHidden = (list, row) => {
  const { isEdit } = row || {}
  return list.includes(String(isEdit))
}

const headerConfig = {
  'convertStandardCoalCoefficient': [
    {
      prop: 'id',
      name: 'ID',
      minWidth: 110
    },
    {
      prop: 'solidifyDate',
      name: '数据时间',
      minWidth: 110
    },
    {
      prop: 'energyTypeName',
      name: '能源种类',
      minWidth: 110
    },
    {
      prop: 'coefficient',
      name: '拆标准煤系数',
      minWidth: 110
    },
    {
      prop: 'unit',
      name: '单位',
      minWidth: 110
    },
    {
      prop: 'modifyTm',
      name: '更新时间',
      minWidth: 110
    },
    {
      name: '操作',
      width: 200,
      fixed: 'right',
      thStyle: { 'text-align': 'left' },
      operateList: [
        {
          type: 'btnText',
          label: '编辑',
          id: 'convertStandardCoalCoefficient-edit',
          authId: 'ecp-admin:convertStandardCoalCoefficient:update',
          config: { type: 'text' },
          style: { color: 'rgb(219,139,57)' },
          hidden: (val) => {
            return false // !isHidden(['1'], val)
          }
        },
        // {
        //   type: 'btnText',
        //   label: '删除',
        //   id: 'emission-reduction-factor-delete',
        //   authId: 'ecp-admin:emissionReductionFactor:deleteById',
        //   isMore: true,
        //   config: { type: 'text' },
        //   style: { color: '#ff0000' },
        //   hidden: (val) => {
        //     return false // !isHidden(['1'], val)
        //   }
        // }
      ]
    }
  ]
}

export default {}
export { headerConfig }
